package com.gao.buffered;

import java.io.*;
import java.nio.Buffer;

/**
 * @Author: ShanYuqing
 * @Version: v1.0
 */
public class BufferStreamDemo1 {
    /*
        字符缓冲流的基本使用

            注意:缓冲流本身不具备读写功能，只是对普通的流对象做包装
            构造方法:

            BufferedReader(Reader reader)

            BufferedWriter(Writer writer)

     */
    public static void main(String[] args) throws IOException {
        BufferedReader reader =new BufferedReader(new FileReader("day11\\A.txt"));
        BufferedWriter writer = new BufferedWriter(new FileWriter("day11\\B.txt"));
    }

    private static void mehod() throws IOException {
        BufferedReader reader =new BufferedReader(new FileReader("day11\\A.txt"));
        BufferedWriter writer = new BufferedWriter(new FileWriter("day11\\B.txt"));
        int i ;
        while((i= reader.read())!=-1){
            writer.write(i);
        }
        reader.close();
        writer.close();
    }
}
